package cn.casc.tools;

import java.util.Comparator;

/**
 * @author max
 * @version 1.0.1
 * @className Sortable
 * @description
 * @copyright Copyright (c) 2023
 * @company 天纲梦工厂
 * @datetime 2024/7/18 15:15
 **/

public class Sortable<T> implements Comparator<Sortable<T>> {
    public int score;
    public T value;

    public Sortable(int score, T value) {
        this.score = score;
        this.value = value;
    }

    @Override
    public int compare(Sortable<T> o1, Sortable<T> o2) {
        return o2.score - o1.score;
    }

}
